// 统一请求路径前缀在libs/axios.js中修改
import { postRequest, managerUrl } from "@/libs/axios";

// 获取线下预约分页列表
export const postRegisterPage = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/user/userRegister/pagelist`, params, headers);
};

// 获取在线咨询分页列表
export const postOnlinePage = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/order/userConsult/pagelist`, params, headers);
};

// 获取服务审核分页列表
export const postExaminePage = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expertOnDutyApplyRecord/pagelist`, params, headers);
};

// 关闭在线咨询服务 
export const postTurnOffOnline = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expert/consultOpen`, params, headers);
};

// 关闭线下咨询服务
export const postTurnOffline = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expert/registerOpen`, params, headers);
};

// 专家在线咨询-线下会诊状态
export const postExpertStatus = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expert/getRegisterOpenConsultOpen`, params,headers);
};

// 审核-通过
export const postExamineYes = (id) => {
  return postRequest(`${managerUrl}/manager/expert/expert/service/pass/${id}`);
};

// 审核-拒绝
export const postExamineNo = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expert/service/refuse`, params, headers);
};

// 强制关闭线下会诊
export const postForceCloseRegister = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/expert/expert/forceCloseRegister`,params, headers);
};

// 在线咨询处方下载权限
export const postUpAuthority = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/order/userConsult/prescriptionDetailsDownload`,params, headers);
};

// 线下预约处方下载权限
export const postDownAuthority = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/user/userRegister/prescriptionDetailsDownload`,params, headers);
};
